package domain

import (
	"context"
)

type RootService interface {
	Register(ctx context.Context, root *Root, VerificationCode int32) (string, error)

	LoginByID(ctx context.Context, id int64, passwd string) (string, error)
	LoginByName(ctx context.Context, name string, passwd string) (string, error)
	LoginByPhone(ctx context.Context, countryCode, phone int64, passwd string) (string, error)

	UpdateInfo(ctx context.Context, root *Root) error
	UpdatePassword(ctx context.Context, token string, oldPassword, newPassword string) error
	UpdateIDCard(ctx context.Context, token string, idCard string) error
	UpdateLevel(ctx context.Context, token string, level int32) error
	UpdateLastLogin(ctx context.Context, token string) error

	Enable(ctx context.Context, token string, id int64) error
	Disable(ctx context.Context, token string, id int64) error

	Delete(ctx context.Context, token string, id int64) error
}
